package com.woniu04;

import java.util.HashSet;
import java.util.Random;
import java.util.Set;

public class Test02 {
    public static void main(String[] args) {
        Set<Integer> randomSet = new HashSet<>();
        Random random = new Random();

        while (randomSet.size() < 10) {
            int randomNumber = random.nextInt(20);
            randomSet.add(randomNumber);
        }

        System.out.println(randomSet);
    }
}
